package Bean;

/**
 * @Author czl
 * @Date 2024-03-27
 */
public class MainTest1 {
    public static void main(String[] args) throws Exception {
        Student stu = new Student();

        // 给 Bean 对象设置属性
        BeanUtil1.setProperty(stu,"name","张三");
        BeanUtil1.setProperty(stu,"age",19);

        // 获取 Bean 对象的属性值
        Object name = BeanUtil1.getProperty(stu, "name");
        Object age = BeanUtil1.getProperty(stu, "age");

        System.out.println("姓名：" + name);
        System.out.println("年龄：：" + age);

    }
}
